package com.huqing.icu.dao;

import com.huqing.icu.mapper.UserViewHouseRecordMapper;
import com.huqing.icu.model.UserViewHouseRecord;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Repository;

/**
 * @Description 用户浏览房源dao
 * @Author huqing
 * @Date 2025/9/13 19:03
 **/
@Repository
public class UserViewHouseRecordDao {

    @Resource
    private UserViewHouseRecordMapper userViewHouseRecordMapper;

    public Integer insert(UserViewHouseRecord userViewHouseRecord) {
        return userViewHouseRecordMapper.insert(userViewHouseRecord);
    }

    public Long selectIdByUserIdAndHouseId(Long userId, Long houseId) {
       return userViewHouseRecordMapper.selectIdByUserIdAndHouseId(userId, houseId);
    }

    public UserViewHouseRecord getOneByUserIdAndHouseId(Long userId, Long houseId) {
        return userViewHouseRecordMapper.getOneByUserIdAndHouseId(userId, houseId);
    }

}
